function step() { // UpdateUI(); window.requestAnimationFrame(step); } window.requestAnimationFrame(step);